Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

155 provide example for the material mapping #156

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ClemensLinnhoff
Copy link
Collaborator

@ClemensLinnhoff ClemensLinnhoff commented Oct 25, 2024

Describe your changes

  • Add example glTF file showcasing both mesh-based and texture-based material assignment
  • Adjust material examples, mapping table, asset file etc. to fit to this example
  • Add Readme to explain the examples

Issue ticket number and link

Fixes #155

Checklist before requesting a review

  • I have performed a self-review of my code/documentation.
  • My changes generate no new warnings during the documentation generation.

@ClemensLinnhoff ClemensLinnhoff linked an issue Oct 25, 2024 that may be closed by this pull request
Signed-off-by: ClemensLinnhoff <[email protected]>
@ClemensLinnhoff
Copy link
Collaborator Author

@MatthiasThDs @ipg-jsc @ipg-sig @lyndyRott please also feel free to review this.

Copy link
Member

@AsamDiegoSanchez AsamDiegoSanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General review
Signed-off-by: Diego Sánchez [email protected]

Signed-off-by: ClemensLinnhoff <[email protected]>
@lyndyRott
Copy link
Collaborator

looks like a good example to me. From the checker_xom.png (referring to red and blue material definitions) and the color-channels provided in the mapping table (referring to black and white texture names with red and blue rgb-values) it could be confusing to understand the mapping, if the chosen color values are mixed channel. Nevertheless, I can understand that these are the chosen IDs for the material mapping.

@ClemensLinnhoff
Copy link
Collaborator Author

looks like a good example to me. From the checker_xom.png (referring to red and blue material definitions) and the color-channels provided in the mapping table (referring to black and white texture names with red and blue rgb-values) it could be confusing to understand the mapping, if the chosen color values are mixed channel. Nevertheless, I can understand that these are the chosen IDs for the material mapping.

Thanks for your review. I can see how this might be confusing. But I actually deliberately chose other colors than black and white for the assignment texture to showcase, that these are just arbitrary mapping IDs and not the actual colors of the visual texture. I think we need to make this very clear in the documentation about the assignment/mapping.

@KimuraDIVP
Copy link

I think we'd better add the discription about assigning Matrial Mapping File (example_mapping.xomm) to Asset File (example_asset.xoma).

Signed-off-by: ClemensLinnhoff <[email protected]>
Signed-off-by: ClemensLinnhoff <[email protected]>
@ClemensLinnhoff
Copy link
Collaborator Author

I think we'd better add the discription about assigning Matrial Mapping File (example_mapping.xomm) to Asset File (example_asset.xoma).

You are right, thanks for the remark. I somehow missed that.
I added it now as "materialMappingUri".

Copy link
Collaborator

@LudwigFriedmann LudwigFriedmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool example! I was about to suggest adding an object with global material parameters in parallel to the textured cube, until I found the sphere in the code :)

["material_green", "materials/material_b.xomp", "metal with green paint"],
["material_blue", "materials/material_c.xomp", "metal with blue paint"]
["Material_Sphere", "example_material.xomp", "white aluminum"],
["rgba:255;0;0;255", "example_material.xomp", "white aluminum"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @ClemensLinnhoff i am wondering if we should limit ourself to RGB values here. 24 Bit, 16 Mio values enough for all kinds of MaterialIDs.
I think that the alpha value could be useful for something we plan in OpenMaterial 2.0. But if people now already use the alpha channel for IDs, then its hard to change.
My idea here would be to reserve the alpha channel for the future. Maybe for layered Materials.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding this: we may also want to clarify, that the MaterialID Textures need to be 32Bit RGBA.
or do we want to support 24Bit RGB as well?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are missing the link to the XOMM file, from the XOMA file.
Something like "materialMapping" : "example_mapping.xomm"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide example for the material mapping
6 participants